package com.eckey.lab.controller;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;

@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/findOrderByUserId")
    public String getUserById() {
        HashMap<String, Object> maps = new HashMap<String, Object>();
        maps.put("name", "张三");
        maps.put("age", 19);
        log.info("返回用户信息：{}",maps);
        return JSON.toJSONString(maps);
    }
}
